﻿<?php
require_once(dirname(__FILE__)."/../../libs/login/login.php"); 
require_once(dirname(__FILE__)."/../../libs/dbclass/dbconnect.php");
require_once(dirname(__FILE__)."/../../libs/string/libstr.php");
require_once(dirname(__FILE__)."/../../include/fun.php");
require_once(dirname(__FILE__)."/../../libs/string/pager.php");
require_once(dirname(__FILE__)."/../../admin/libs/config_class.php");
$lg=new login();
$mc=new libstr();
$lg->checklogin("admin_member");//检验是否登录
$mc=new libstr();
$cf=new config();

$artInfo=$cf->getInfos('single_acticle');


//print_r($artInfo);

$path="单页文档列表";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>
</head>
<body style="background:#fff"> 

<div class="content">
    <div class="right">
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
   	<tr>
        <td width="100%" height="24" class="top_head">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="1%" align="right"  height="45">&nbsp;</td>
                <td width="99%" >
                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="55%" style="padding-left:20px;padding-top:10px;"><img src="../images/head.gif" width="13" height="11"><b><?php echo $path;?></b><a href="single_article_edit.php?act=add" style=" margin-left:20px; text-decoration:underline;">添加文档</a></td>
                    <td width="45%" align="right">&nbsp;</td>
                  </tr>
                </table>
                </td>
              </tr>
            </table>
        </td>
      </tr>
      <tr>
        <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bg">
      <tr>
      	<td valign="middle" align="center" >
             <table width="92%"   border="1px" bordercolor="#ccc" cellspacing="0px" style="border-collapse:collapse">
                  <thead align="center" bgcolor="#EEEEEE">
                    <tr>
                    	<th  width="5%" height="28" align="center"  >文章ID</th>
                        <th  width="20%" height="28" align="left" style="padding-left:1%;">文章名称</th>
                        <th width="30%" height="28" align="left" style="padding-left:1%;">内容简介</th>
                        <th width="15%" height="28" align="center">发布时间</th>
                        <th width="15%" height="28" align="center">修改时间</th>
                        <th width="15%" colspan="2" align="center">操作</th>
                    </tr>
                  </thead>
                <tbody>
               <?php if(count($artInfo)>0){ ?>   
                <?php foreach ($artInfo as $rs){?>
                  <tr align="center" bgcolor="#FFFFFF">
                      <td  height="28" align="center"><?php echo $rs["id"];?></td>
                      <td align="left" style="padding-left:1%;"><a href="#"><?php echo $rs["topicname"]?></a> </td>
                       <td height="28" align="left" style="padding-left:1%;"><?php echo cut_str($rs["summary"],20);?></td>
                      <td height="28" align="center"><?php echo $mc->gettime($rs["createtime"]);?></td>
                      <td height="28" align="center"><?php echo $mc->gettime($rs["updatetime"]);?></td>
                      <td height="28" colspan="2" align="center">
                      <bdo><input type="button" name="button8" id="button8" value="编辑" onclick="location.href='single_article_edit.php?id=<?php echo $rs["id"]?>&act=edit'"/></bdo>
                
                      </td>
                  </tr>
              <?php } }else{?>
                  <tr align="center" bgcolor="#FFFFFF">
                 
                      <td height="30" colspan="9" align="center">对不起，暂时找不到相关资源！</td>
                      
                  </tr>
                  <?php }?>
                </tbody>
            </table>
            </td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
    </div>
</div>
</body>
</html>